package cn.steam.bar.consumer;

import lombok.extern.slf4j.Slf4j;
import org.springframework.kafka.annotation.KafkaHandler;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * @author zhang jintao on 2022/05/11
 **/
@Component
@Slf4j
@KafkaListener(topics = "topic_foo", groupId = "groupId_one")
public class KafkaConsumer {

    @KafkaHandler
    public void receive(String message) {
        log.info("我是消费者，我接收到的消息是：" + message);
    }

}
